import request from '@/utils/request'


// 查询资产类别信息列表
export function getSuperiorByAssetType(assetType) {
  return request({
    url: '/asset/category/getSuperiorAssetList/' + assetType,
    method: 'get',
  })
}

// 查询资产类别信息列表
export function listCategory(query) {
  return request({
    url: '/asset/category/list',
    method: 'get',
    params: query
  })
}

// 查询资产类别信息详细
export function getCategory(assetId) {
  return request({
    url: '/asset/category/' + assetId,
    method: 'get'
  })
}

// 新增资产类别信息
export function addCategory(data) {
  return request({
    url: '/asset/category',
    method: 'post',
    data: data
  })
}

// 修改资产类别信息
export function updateCategory(data) {
  return request({
    url: '/asset/category',
    method: 'put',
    data: data
  })
}

// 删除资产类别信息
export function delCategory(assetId) {
  return request({
    url: '/asset/category/' + assetId,
    method: 'delete'
  })
}


// 查询资产类别下拉树结构（只到中类）
export function categoryTreeSelect() {
  return request({
    url: '/asset/category/categoryTree',
    method: 'get'
  })
}

export function categoryCascaderQuery() {
  return request({
    url: '/asset/category/categoryCascader',
    method: 'get'
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}
